const http = (url, method, data) => {
  return new Promise((resolve) => {
    wx.request({
      url: 'http://www.pudge.wang:4000' + url, //仅为示例，并非真实的接口地址
      method: method || "GET",
      data: data || {},
      header: {
        'content-type': 'application/json' // 默认值
      },
      success: (res) => {
        resolve(res.data)
      }
    })
  })
}

module.exports = {
  http
}